package com.yr.ryjk.user.entity;

import java.util.Date;

import javax.validation.constraints.Past;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import com.yr.ryjk.common.Constant;
/**
 * 接收用户注册数据的实体模型
 * @author Rick
 *
 */
public class UserRegisterModel {
	@NotBlank(message="用户名不能为空")
	private String name;
	
	@NotBlank(message="密码不能为空")
    private String password;

	@NotBlank(message="手机号不能为空")
    private String phone;

	@NotBlank(message="验证码不能为空")
	private String checkcode;
	
    private int gender;

    @Past(message="生日必须是过去的日期")
    @DateTimeFormat(pattern=Constant.DATE_FORMAT_YEAR)
    private Date birthday;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public int getGender() {
		return gender;
	}

	public void setGender(int gender) {
		this.gender = gender;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public void setCheckcode(String checkcode) {
		this.checkcode = checkcode;
	}
	public String getCheckcode() {
		return checkcode;
	}
}
